#!/usr/bin/python
# -*- coding: utf-8 -*-

from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get
from pisi.actionsapi import shelltools

WorkDir = "puzzles-r%s"% get.srcVERSION()

def build():
    autotools.make("prefix=/usr")

def install():
    autotools.rawInstall("prefix=/usr gamesdir=/usr/bin DESTDIR=%s" %  get.installDIR())

    #Rename game names
    shelltools.cd(get.installDIR() + "/usr/bin")
    for game in shelltools.ls(get.curDIR()):
        shelltools.move(game, "sgt-%s" % game)
    #shelltools.copy("%s/puzzles-r%s/icons/*48d24.png" % (get.workDIR(), get.srcVERSION()), "/usr/share/pixmaps/sgt-puzzles")
